﻿using System;
using System.Collections.Generic;

namespace UniSender
{
    using IValues = IDictionary<string, string>;
    using Values = Dictionary<string, string>;

    public class CampaignStats
    {
        private IValues custom = new Values();

        public virtual IValues Custom {
            get { return custom; }
            set { custom.Update(value); }
        }

        public virtual MessageStatus? Status { get; set; }

        public virtual string Phone { get; set; }

        public virtual string Email { get; set; }

        public virtual DateTime? LastUpdate { get; set; }

        public string Contact
        {
            get { return Phone ?? Email; }
        }

        public bool HasPhone
        {
            get { return !String.IsNullOrEmpty(Phone); }
        }

        public bool HasEmail
        {
            get { return !String.IsNullOrEmpty(Email); }
        }
    }
}
